package com.west_traveler.entity.entity_editor;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Description:小编推荐 的八个项目 中每一个项目实体类
 * created at 2016/12/2 16:24
 *
 * @author: 黄昌友
 */

public class PerProject implements Parcelable {
//            "title":"听资讯",
//            "subtitle":"",
//            "coverPath":"http://fdfs.xmcdn.com/group6/M0A/9E/08/wKgDg1dedp7CeL1bAABTCuIsHnA668.jpg",
//            "contentType":"album_detail",
//            "url":"",
//            "sharePic":"",
//            "enableShare":false,
//            "isExternalUrl":false,
//            "properties":
    private String title;
    private String subtitle;
    private String coverPath;
    private String contentType;
    private String url;
    private String sharePic;
    private boolean enableShare;
    private boolean isExternalUrl;
    private Propertie properties;

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getSubtitle() {
        return subtitle;
    }

    public void setSubtitle(String subtitle) {
        this.subtitle = subtitle;
    }

    public String getCoverPath() {
        return coverPath;
    }

    public void setCoverPath(String coverPath) {
        this.coverPath = coverPath;
    }

    public String getContentType() {
        return contentType;
    }

    public void setContentType(String contentType) {
        this.contentType = contentType;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getSharePic() {
        return sharePic;
    }

    public void setSharePic(String sharePic) {
        this.sharePic = sharePic;
    }

    public boolean isEnableShare() {
        return enableShare;
    }

    public void setEnableShare(boolean enableShare) {
        this.enableShare = enableShare;
    }

    public boolean isExternalUrl() {
        return isExternalUrl;
    }

    public void setExternalUrl(boolean externalUrl) {
        isExternalUrl = externalUrl;
    }

    public Propertie getProperties() {
        return properties;
    }

    public void setProperties(Propertie properties) {
        this.properties = properties;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.title);
        dest.writeString(this.subtitle);
        dest.writeString(this.coverPath);
        dest.writeString(this.contentType);
        dest.writeString(this.url);
        dest.writeString(this.sharePic);
        dest.writeByte(this.enableShare ? (byte) 1 : (byte) 0);
        dest.writeByte(this.isExternalUrl ? (byte) 1 : (byte) 0);
        dest.writeParcelable(this.properties, flags);
    }

    public PerProject() {
    }

    protected PerProject(Parcel in) {
        this.title = in.readString();
        this.subtitle = in.readString();
        this.coverPath = in.readString();
        this.contentType = in.readString();
        this.url = in.readString();
        this.sharePic = in.readString();
        this.enableShare = in.readByte() != 0;
        this.isExternalUrl = in.readByte() != 0;
        this.properties = in.readParcelable(Propertie.class.getClassLoader());
    }

    public static final Parcelable.Creator<PerProject> CREATOR = new Parcelable.Creator<PerProject>() {
        @Override
        public PerProject createFromParcel(Parcel source) {
            return new PerProject(source);
        }

        @Override
        public PerProject[] newArray(int size) {
            return new PerProject[size];
        }
    };
}
